package org.jeecg.modules.demo.oa.mapper;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.oa.entity.ComApprovalList;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.demo.oa.vo.ShenPiData;

/**
 * @Description: 审批清单
 * @Author: jeecg-boot
 * @Date:   2024-09-13
 * @Version: V1.0
 */
public interface ComApprovalListMapper extends BaseMapper<ComApprovalList> {

    void shenpi(ShenPiData shenPiData);

    Integer getJiedianOrdinal(@Param("tableName") String tableName,@Param("tableRecordId") String tableRecordId);


    int getDaiShenPiCount(@Param("tableName") String tableName,
                          @Param("mainIdColName") String mainIdColName,
                          @Param("mainRecordId") String mainRecordId,
                          @Param("jiedianOrdinal") int jiedianOrdinal,
                          @Param("resultColName") String resultColName);

    String getMainRecordId(@Param("tableName") String tableName, @Param("tableRecordId")  String tableRecordId,
                           @Param("mainIdColName") String mainIdColName);

    List< Map<String, Object>> getShenPiList(@Param("tableName")  String tableName,
                                             @Param("mainIdColName") String mainIdColName,
                                             @Param("mainRecordId") String mainRecordId,
                                             @Param("jiedianOrdinal") Integer jiedianOrdinal,
                                             @Param("resultColName") String resultColName);

    void updateMainTableStatus(@Param("mainTableName") String mainTableName, @Param("mainRecordId") String mainRecordId,
                               @Param("status") String status,@Param("username") String username,@Param("shenpiTime") Date shenpiTime);


    void updateTableStatus(@Param("tableName") String tableName,
                           @Param("tableRecordId") String tableRecordId,
                           @Param("resultColName") String resultColName,
                           @Param("yijianColName") String yijianColName,
                           @Param("timeColName") String timeColName,
                           @Param("resultValue") String resultValue);

    void updateMainTableOrdinal(@Param("mainTableName") String mainTableName,
                                @Param("mainRecordId") String mainRecordId,
                                @Param("shenpiOrdinal") Integer shenpiOrdinal,
                                @Param("updateBy") String updateBy,
                                @Param("updateTime") Date updateTime);

    void updateMainTableOrdinalStautus(@Param("mainTableName") String mainTableName,
                                       @Param("mainRecordId") String mainRecordId,
                                       @Param("shenpiOrdinal") Integer shenpiOrdinal,
                                       @Param("billStatus") String billStatus,
                                       @Param("updateBy") String updateBy,
                                       @Param("updateTime") Date updateTime);

    String getShenQinUserName(@Param("mainTableName")  String mainTableName, @Param("mainRecordId") String mainRecordId);
}
